<?php $this->_extends('../_layouts/default_layout'); ?>
<?php $this->_block('contents'); ?>
<link type="text/css" href="<?=Q::ini('custom_system/base_url')?>css/jq.autocomplete.css" rel="stylesheet" />
<script type="text/javascript" src="<?=Q::ini('custom_system/base_url')?>js/jq.autocomplete.js"></script>
<script type="text/javascript">
$(function(){
	$("#bind_form").submit(function(){
		if (! $("#type_select").val())
		{
			alert("请选择创建部门");
			return false;
		}
	});
});
</script>
<form method="post" action="<?=url('Product::Bind/BindEditSave')?>" id="bind_form">
<table class="form_table">
<tr>
	<th>捆绑号：</th>
	<td><?=$product_bind['number']?></td>
</tr>
<tr>
	<th>捆绑名称：</th>
	<td><input type="text" name="name" value="<?=$product_bind['name']?>" size="40"/></td>
</tr>
<tr>
	<th>创建部门：</th>
	<td>
		<select name="type" id="type_select">
			<option value="">请选择</option>
			<?foreach (Q::ini('custom_flag/product_bind_type') as $pdt):?>
			<option value="<?=$pdt['value']?>" <?if ($pdt['value'] == $product_bind['type']):?>selected="selected"<?endif;?>><?=$pdt['name']?></option>
			<?endforeach;?>
		</select>
	</td>
</tr>
<tr>
	<th>创建时间：</th>
	<td><?=$product_bind['create_time']?></td>
</tr>
<tr>
	<th></th>
	<td>
		<input type="hidden" name="product_bind_id" value="<?=$product_bind['id']?>" />
		<input type="submit" class="button" value="保存"/>
	</td>
</tr>
</table>
</form>
<table class="list_table"  width="60%" id="list">
<tr>
	<th>产品编号</th>
	<th>捆绑数量</th>
</tr>
<?foreach ($product_bind['item'] as $pbi):?>
<tr>
	<td>
		<input type="text" size="70" value="<?=$pbi['number']?> <?=$pbi['name']?>" disabled="disabled"/>
	</td>
	<td width="80"><input type="text" size="7" value="<?=$pbi['quantity']?>" disabled="disabled"/></td>
</tr>
<?endforeach;?>
</table>
<?php $this->_endblock();?>